package com.auth.manager.pojo.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @version 1.0.0
 * @Date: 2022/4/28 20:35
 * @Author ZhuYouBin
 * @Description 角色实体
 */
@Data
@NoArgsConstructor
@TableName(value = "sys_role")
public class SysRole implements Serializable {

    /**
     * rid角色唯一标识
     */
    @TableId(type = IdType.AUTO)
    private Integer rid;

    /**
     * 角色名称
     */
    @NotBlank(message = "角色名称不能为空")
    @Size(min = 1, max = 30, message = "角色名称长度不能超过30")
    @TableField(value = "role_name")
    private String roleName;

    /**
     * 角色唯一标识
     */
    @NotBlank(message = "角色唯一标识不能为空")
    @Size(min = 1, max = 30, message = "角色唯一标识长度不能超过30")
    @TableField(value = "role_key")
    private String roleKey;

    /**
     * 角色描述
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 删除标识(01未删除02已删除)
     */
    @TableField(value = "deleted")
    private String deleted;

    /**
     * 创建日期
     */
    @TableField(value = "create_time")
    private String createTime;

    /**
     * 请求url
     */
    @TableField(value = "url", exist = false)
    private String url;

}
